<?php
declare(strict_types=1);

namespace App\Http\Requests\Ai;

use App\Http\Requests\BaseValidate;
use Illuminate\Validation\Rule;

class BaiduImageProcessValidate extends BaseValidate
{
    public function rules(): array
    {
        return [
            "imageUrl" => "required|url",
            "maskId" => "sometimes|in:1,2,3,4,5,6,7,8",
            "artistValue" => ["required", Rule::in("anime", "anime_mask")],
        ];
    }

    public function messages(): array
    {
        return [
            "imageUrl.required" => "图片不能为空",
            "imageUrl.url" => "图片地址无效",
            "maskId.in" => "图片编码错误",
            "artistValue.require" => "图片风格不能为空",
            "artistValue.in" => "图片编码不存在",
        ];
    }
}
